<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 具名函数
    function fn1(){
      console.log('具名函数')
    }
    fn1()
   // 匿名函数
   let fn2 = function fn(){
      console.log('匿名函数')
   }
   fn2()
   // 箭头函数
   let fn3 = () => {
      console.log('箭头函数')
   }
   fn3()

   function fn4(a,b,...c){
    console.log(a)
    console.log(b)
    console.log(...c)
   }
  // fn4(12,3,4,5,6)
  // fn4(12,3,[4,5,6])
  // fn4(1,'x','n','s',2)
  fn4('小红', 'woman', 1, 2, 3)
  </script>
</body>
</html>